﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Rated.DAL.Db;

namespace Rated.Website.Helpers
{
    public static class RatedItemHelper
    {

        public static List<AttributeType> SupportedAttributeTypes(int ratedItemTypeID)
        {
            RatedEntities db = new RatedEntities();
            var ratedItemType = db.RatedItemTypes.Where(o => o.ID == ratedItemTypeID).Single();
            return db.AttributeTypes.ToList().Where(o => o.RatedItemTypes.Contains(ratedItemType)).ToList();
        }
    }
}